"use client"
import React, { useState } from 'react';
import Link from 'next/link';
import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
<<<<<<< HEAD
// import Breadcrumb from '../../app/components/Breadcrumb';
// import Breadcrumb from '../component/mbx';
=======
// import Breadcrumb from '../component/Breadcrumb';
import Breadcrumb from '../component/mbx';
>>>>>>> lxt
import {
  BookOutlined,
  UserOutlined,
  VideoCameraOutlined,
  OrderedListOutlined
} from '@ant-design/icons';
import { Button, Layout, Menu, theme, } from 'antd';
import { link } from 'fs';
import { useRouter } from 'next/navigation';
const { Header, Sider, Content } = Layout;
const geistSans = Geist({
  variable: "--font-geist-sans",
  subsets: ["latin"],
});

const geistMono = Geist_Mono({
  variable: "--font-geist-mono",
  subsets: ["latin"],
});


const Home = ({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) => {
  const {
    token: { colorBgContainer, borderRadiusLG },
  } = theme.useToken();
  const router = useRouter()

  const routes = [
    {
      key: '/lxt',
      icon: <UserOutlined />,
      label: '全部商机',
    },
    {
      key: '/lxt/dingdan/mydingdan',
      icon: <VideoCameraOutlined />,
      label: '我的商机',
    },
    {
      key: '/lxt/dingdan/xiashudingdan',
      icon: <VideoCameraOutlined />,
      label: '下属商机',
    },
    {
      key: '/lxt/dingdan/woxiezuo',
      icon: <VideoCameraOutlined />,
      label: '我协作的',
    },
    {
      key: '/lxt/dingdan/xiashuxiezuo',
      icon: <VideoCameraOutlined />,
      label: '下属协作',
    },
    {
      key: '/lxt/dingdan/adddingdan',
      icon: <VideoCameraOutlined />,
      label: '成交商机',
    }
  ]
  return (<>
    <div>
      <Layout style={{ height: "100vh" }}>
        <Sider style={{ background: "#435188" }} collapsed={true}>
          <div className="demo-logo-vertical" />
          <Menu
            theme="dark"
            mode="inline"
            style={{ background: "#435188" }}
            defaultSelectedKeys={['1']}
            onSelect={(i) => {
              router.push(i.key)
            }}
            items={[
              {
                key: "/lxt",
                icon: <BookOutlined />,
                label: '客服管理',
              }
            ]}
          />
        </Sider>

        <Sider width="150px" style={{ background: "skyblue" }}>
          <div className="demo-logo-vertical" />
          订单管理
          <Menu
            style={{ background: "skyblue" }}
            theme="dark"
            mode="inline"
            defaultSelectedKeys={['1']}
            onSelect={(i) => {
              router.push(i.key)
            }}
            items={routes}
          />
        </Sider>

        <Layout>
          <Header style={{ padding: 0, background: colorBgContainer }}>
            {/* 顶部 */}
            <Breadcrumb></Breadcrumb>
          </Header>
          <Content
            style={{
              margin: '24px 16px',
              padding: 24,
              minHeight: 280,
              background: colorBgContainer,
              borderRadius: borderRadiusLG,
            }}
          >
            {children}
          </Content>
        </Layout>
      </Layout>
    </div>
  </>
  );
};

export default Home;
